package com.tongyi.shop.common.enums;

/**
 * @author
 */

public enum StatusCodeEnum {

    /**
     * 响应状态
     */
    Success(200,"请求成功"),
    Fail(500,"服务器异常"),
    INTERFACE_TIMEOUT(504, "接口超时"),
    INVALID_PARAM(400, "无效参数"),
    INVALID_ROLE(401, "未授权"),
    RECORD_NOT_EXISTS(404, "资源不存在"),
    METHOD_NOT_ALLOWED(405, "不支持的请求方式"),
    FORBIDDEN(403, "拒绝访问");

    private Integer code;
    private String msg;


    StatusCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
